#ifndef DW_GRAPHICS_MODELMANAGER_H
#	define DW_GRAPHICS_MODELMANAGER_H

#include "base/singleton.h"

namespace dw {
	namespace graphics {

class Model;

class ModelManager : public dw::base::Singleton< ModelManager >
{
public:
	/// Load model
	Model* loadModel(const std::string& filename);
	/// Unload model by name
	void unloadModel(const std::string& filename);
	/// 
	void unloadAll();

	bool isModelLoaded(const std::string& name);

private:

	typedef std::map<std::string, Model*>	ModelNameMap;
	
	typedef ModelNameMap::iterator ModelIterator;

private:

	/// Managed model map
	ModelNameMap _modelsByName;

	std::string _rootPath;

};

} // namespace graphics
} // namespace dw

#endif // !DW_GRAPHICS_MODELMANAGER_H
